package top.bulk.logdynamic.schedule;

import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.time.LocalTime;

/**
 * @author 散装java
 * @date 2024-07-29
 */
@Component
@Slf4j
public class BulkJob2 {
    /**
     * 用于定时输出日志
     */
    @Scheduled(cron = "0/1 * * * * ?")
    public void job() {
        LocalTime now = LocalTime.now();
        log.trace("BulkJob2 -> trace 级别日志输出：{}", now);
        log.debug("BulkJob2 -> debug 级别日志输出：{}", now);
        log.info("BulkJob2 -> info 级别日志输出：{}", now);
        log.warn("BulkJob2 -> warn 级别日志输出：{}", now);
        log.error("BulkJob2 -> error 级别日志输出：{}", now);
    }
}
